#include<bits/stdc++.h>
using namespace std;

#define L 0.99
#define R 1.01
#define step 0.0002

double f(const double &x){
    return pow(x,8)-8*pow(x,7)+28*pow(x,6)-56*pow(x,5)+70*pow(x,4)-56*pow(x,3)+28*x*x-8*x+1;
}
double g(const double &x){
    return (((((((x-8)*x+28)*x-56)*x+70)*x-56)*x+28)*x-8)*x+1;
}
double h(const double &x){
    return pow(x-1,8);
}

int main(){
    double x = L;
    ofstream out;
    out.open("A.txt");
    while(x <= R ){
        out<< setw(15)<< setiosflags(ios::right)<< f(x);
        out<< setw(15)<< setiosflags(ios::right)<< g(x);
        out<< setw(15)<< setiosflags(ios::right)<< h(x);
        out << endl;
        x += step;
    }
    out.close();
    cout << "Problem A is printed in A.txt" << endl;
    return 0;
}